package com.example.demo.service;
import com.example.demo.dao.UserDao;
import com.example.demo.entity.User;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserService {
   @Autowired
    private UserDao userDao;
    public int updatedemo(User user){
        return userDao.updateInfo(user);
    }
    public int deletedemo(User user){
        return userDao.deleteInfo(user);
    }
   public int adddemo(User user){
       return userDao.addInfo(user);
   }
    public List querydemo(User user){
        PageHelper.startPage(1,2);
        Page list=(Page)userDao.queryInfo(user);
        return list;
    }


}
